<?php
class G extends CI_Controller
{
    function pai()
    {
//         $arr1 = array('1','2','3','4','5','6','7','8','9','10');
        $arr1 = array('一','二','三','四','五','六','七','八','九','十');
        $arr2 = array('壹','贰','叁','肆','伍','陆','柒','捌','玖','拾');
        $arr = array();
        $arr = array_merge($arr, $arr1,$arr1,$arr1,$arr1,$arr2,$arr2,$arr2,$arr2);
//         print_r($arr);
        shuffle($arr);
//         print_r($arr);
        $user1 = array();
        $user2 = array();
        $user3 = array();
        $end = array();
        $index1 = 0;
        $index2 = 1;
        $index3 = 2;
        print_r($arr);
        foreach ($arr as $key=>$val)
        {
            if($key===$index1)
            {
                array_push($user1, $val);
                $index1 +=3;
            }else if($key===$index2) 
            {
                array_push($user2, $val);
                $index2 +=3;
            }else if($key===$index3) 
            {
                array_push($user3, $val);
                $index3 +=3;
            }
            if($key===60)
            {
               $end= array_slice($arr,61);
                break;
            }
        }
        print_r($user1);
        print_r($user2);
        print_r($user3);
        print_r($end);
        
        array_multisort($user1, SORT_ASC);
        print_r($user1);
    }
    function _pai_sort($arr)
    {
        $sort_arr = array();
        foreach ($arr as $key=>$val)
        {
            
        }
        return $sort_arr;
    }
}